package com.leyou.trade.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leyou.trade.dto.OrderFormDTO;
import com.leyou.trade.entity.Order;

import java.util.Map;

public interface OrderService extends IService<Order> {
    //创建订单
    Long createOrder(OrderFormDTO orderDTO);

    //根据订单编号创建支付链接
    String getPayUrl(Long orderId);

    //微信支付成功回调
    void handleNotify(Map<String, String> data) throws Exception;

    //查看订单支付状态
    Integer queryPayStatus(Long orderId);

    //监听清理订单的消息
    void evictOrderIfNecessary(Long orderId);
}
